cmake_minimum_required(VERSION 2.6)
project(zmq_msg)

set(CMAKE_BUILD_TYPE Debug)
message("CMAKE_BUILD_TYPE:" ${CMAKE_BUILD_TYPE})

# set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -lpthread")
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -lpthread")
message("CMAKE_CXX_FLAGS_DEBUG:" ${CMAKE_CXX_FLAGS_DEBUG})
message("CMAKE_CXX_FLAGS_RELEASE:" ${CMAKE_CXX_FLAGS_RELEASE})

include_directories(./include)

add_executable(zmq_broker ./zmqBroker/zmqBroker.cpp)
add_executable(zmq_client ./zmqClient/zmqClient.cpp ../protobuf/msg.pb.cc)
add_executable(zmq_worker ./zmqWorker/zmqWorker.cpp ../protobuf/msg.pb.cc)
target_link_libraries(zmq_broker zmq)
target_link_libraries(zmq_client zmq protobuf)
target_link_libraries(zmq_worker zmq protobuf pthread dl)

add_library(modules SHARED ./modules/modules.cpp)